﻿@inject IStringLocalizer<BootstrapBlazor.Shared.Samples.Markdowns> Localizer

<ValidateForm Model="@Model">
    <div class="row g-3 form-inline">
        <div class="col-12">
            <Markdown @bind-Value="Model.Name"></Markdown>
        </div>
        <div class="col-12">
            <Button ButtonType="ButtonType.Submit" Icon="fa-fw fa-solid fa-floppy-disk" Text="@Localizer["MarkdownsValidateSubmitText"]" />
        </div>
    </div>
</ValidateForm>

@code {
    [NotNull]
    private Foo? Model { get; set; }

    /// <summary>
    /// OnInitialized 方法
    /// </summary>
    /// <returns></returns>
    protected override void OnInitialized()
    {
        Model = new() { Name = "Name", Education = EnumEducation.Primary, DateTime = DateTime.Now };
    }
}
